//
//  DingRtcManager.h
//  ding_rtc
//
//  Created by FXY on 2025/7/30.
//

#import <UIKit/UIKit.h>
#import <DingRtc/DingRtcEngine.h>
#import "DingRtcPlugin.h"
#import "DingRtcView.h"

NS_ASSUME_NONNULL_BEGIN

@interface DingRtcManager : NSObject

+ (instancetype)sharedInstance;

- (void)initWithPlugin:(DingRtcPlugin *)plugin
                  extra:(NSString *)extra;

- (void)addView:(NSInteger)viewId view:(DingRtcView *)view;

- (void)removeView:(NSInteger)viewId;

-(void)destroy;

#pragma mark - 自定义供flutter调用的方法

- (void)enterRoomWithParams:(NSDictionary<NSString *, NSString *> *)params;

- (void)leaveRoom;

- (void)setLogLevel:(NSInteger)value;

/// 开始预览
- (void)startLocalPreviewWithCamera:(BOOL)isFrontCamera viewId:(NSInteger)viewId;

/// 开始预览远端
- (void)startRemoteViewWithUserId:(NSString *)userId viewId:(NSInteger)viewId;

- (void)enableSpeakerphone:(BOOL)enable;

- (void)muteLocalAudio:(BOOL)mute;

- (void)enableLocalVideo:(BOOL)enable;

- (void)stopLocalPreview;

- (void)switchCamera;

/// 用户视频进行截图
- (NSInteger)snapshotVideo:(NSString *)userId path:(NSString *)path isScreen:(BOOL)isScreen;

@end

NS_ASSUME_NONNULL_END
